/* style.css */
/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f9fc;
    margin: 0;
    padding: 0;
}

/* 容器样式 */
.container {
    width: 80%;
    margin: 20px auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 标题样式 */
h1, h2, h3 {
    color: #2c5e92;
    margin-top: 0;
}

h1 {
    border-bottom: 2px solid #e1f0ff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th {
    background-color: #2c5e92;
    color: white;
    padding: 12px;
    text-align: left;
}

table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e1f0ff;
}

table tr:nth-child(even) {
    background-color: #f5f9fc;
}

table tr:hover {
    background-color: #e1f0ff;
}

/* 表单样式 */
form {
    margin: 20px 0;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="submit"],
input[type="button"],
button,
a.button {
    background-color: #2c5e92;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 5px 0;
}

input[type="submit"]:hover,
input[type="button"]:hover,
button:hover,
a.button:hover {
    background-color: #1d4b7a;
}

/* 导航链接样式 */
.nav-links {
    margin: 20px 0;
    padding: 10px 0;
    border-top: 1px solid #e1f0ff;
    border-bottom: 1px solid #e1f0ff;
}

.nav-links a {
    color: #2c5e92;
    text-decoration: none;
    margin-right: 15px;
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-links a:hover {
    background-color: #e1f0ff;
}

/* 消息提示样式 */
.message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

/* 页脚样式 */
.footer {
    text-align: center;
    margin-top: 30px;
    padding: 10px;
    color: #666;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }
}

/* 新增样式 */
.post {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e1f0ff;
    border-radius: 5px;
    background-color: white;
}

.pinned {
    border-left: 4px solid #2c5e92;
    background-color: #f5f9fc;
}

.pinned-label {
    color: #2c5e92;
    font-weight: bold;
}

.pin-action {
    float: right;
    color: #2c5e92;
    text-decoration: none;
    font-size: 0.9em;
}

.post-header {
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9em;
}

.post-content {
    margin: 10px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.reply-form {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #e1f0ff;
}

.replies {
    margin-top: 10px;
    margin-left: 30px;
}

.reply {
    padding: 10px;
    margin: 5px 0;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #ccc;
}

.reply-header {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 5px;
}

.reply-content {
    padding-left: 10px;
}

.search-form {
    background-color: #f5f9fc;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: inline-block;
    width: 80px;
    font-weight: bold;
}

.form-actions {
    margin-top: 15px;
}

.pagination {
    margin: 20px 0;
    text-align: center;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #e1f0ff;
    text-decoration: none;
    color: #2c5e92;
}

.pagination .current-page {
    background-color: #2c5e92;
    color: white;
    border-color: #2c5e92;
}

.hint {
    font-size: 0.8em;
    color: #666;
    margin-left: 10px;
}

.form-table {
    width: 100%;
    margin: 20px 0;
}

.form-table td {
    padding: 8px;
    vertical-align: top;
}

.form-table tr:nth-child(even) {
    background-color: #f5f9fc;
}
